Skip to content

Playwright: extend test coverage to kb article helpfulness voting #6648

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

emilghittasv
Copy link
Collaborator

  • GA4 Event Tracking:

    • Added a new ga4_data.json file containing predefined events and parameters for tracking user interactions with the helpfulness widget. This includes events for voting, opening the survey widget, and submitting feedback.
    • Introduced a get_ga_logs helper method in playwright_tests/core/utilities.py to process console logs and extract GA4 events.
  • Widget Locators and Methods:

    • Added locators and actions for interacting with the helpfulness widget in playwright_tests/pages/explore_help_articles/articles/kb_article_page.py.

Test Cases for Helpfulness Widget:

  • Positive Feedback Tests:

    • Added a parameterized test case for positive feedback options (e.g., "Article is accurate") to validate event tracking, widget behavior, and feedback submission.
  • Negative Feedback Tests:

    • Added a parameterized test case for negative feedback options (e.g., "Article is confusing") to ensure proper event tracking, widget behavior and feedback handling.

@emilghittasv emilghittasv requested a review from escattone May 7, 2025 15:39
@emilghittasv emilghittasv merged commit 15f83f2 into mozilla:main May 12, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants